import React from 'react';
import Loadable from '@/components/Loadable';
import { MenuRouteObject } from '@/types/router';
import {
  IconWrench,
  IconMail,
  IconUser,
  IconUserGroup,
  IconDelete,
} from '@douyinfe/semi-icons';

const SystemManagementPage = Loadable(() => import('@/pages/SystemManagement'));

const SystemMessagePage = Loadable(() => import('@/pages/SystemManagement/Message'));
const UserManagePage = Loadable(() => import('@/pages/SystemManagement/User'));
const RoleManagePage = Loadable(() => import('@/pages/SystemManagement/Role'));
const RecycleBinPage = Loadable(() => import('@/pages/SystemManagement/RecycleBin'));

export const systemRoute: MenuRouteObject = {
  title: '系统管理',
  path: 'system',
  fullpath: '/system',
  element: <SystemManagementPage />,
  icon: <IconWrench />,
  children: [
    {
      title: '站内信',
      path: 'message',
      fullpath: '/system/message',
      element: <SystemMessagePage />,
      icon: <IconMail />,
    },
    {
      title: '用户',
      path: 'user',
      fullpath: '/system/user',
      element: <UserManagePage />,
      icon: <IconUser />,
    },
    {
      title: '角色',
      path: 'role',
      fullpath: '/system/role',
      element: <RoleManagePage />,
      icon: <IconUserGroup />,
    },
    {
      title: '回收站',
      path: 'recycle-bin',
      fullpath: '/system/recycle-bin',
      element: <RecycleBinPage />,
      icon: <IconDelete />,
    }
  ],
};
